Skip to content

fix: omit partial declarations unless exportUnsafe is true - #47

Merged
robsimmons merged 1 commit into
masterfrom
partial-is-unsafe
Aug 25, 2026
Merged

fix: omit partial declarations unless exportUnsafe is true#47
robsimmons merged 1 commit into
masterfrom
partial-is-unsafe

Conversation

@robsimmons

Copy link
Copy Markdown
Contributor

There are no kernel checks ensuring that .partial declarations are inhabited, so .partial declarations are as unsafe as .unsafe ones from a kernel-checking perspective.

This change won't break any theorems that safely rely on partial def whatever ..., because the elaborator emits a safe opaque definition for whatever and only tags whatever._unsafe_rec as .partial. (Lean.Replay skips both .unsafe and .partial when importing, so this also matches that behavior.)

@robsimmons
robsimmons requested review from hargoniX and nomeata August 25, 2026 18:07
@robsimmons
robsimmons merged commit 411dce7 into master Aug 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants